package com.neusoft.demo7;

import org.omg.CORBA.CustomMarshal;

public class TestCustomException {
    public static int add(int a,int b)throws CustomException {
        if(a < 0 || b < 0) {
            throw new CustomException();
        }
        return a + b;
    }
    public static void main(String[] args) {
        try {
            int x = add(-3,-5);
            System.out.println(x);
        } catch (CustomException e) {
            e.printStackTrace();
        }
    }
}
